package com.xiguaji.tiktok.task.ranking;

import com.gugee.tiktok.common.model.dal.ranking.RankingFollowersRepository;
import com.gugee.tiktok.common.model.ranking.RankingFollowers;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class RankingFollowerService {

    @Autowired
    RankingFollowersRepository followersRepository;

    public void saveAll(List<RankingFollowers> rankingFollowers){
        followersRepository.bathSave(rankingFollowers);
    }

    public List<RankingFollowers> findRankingFollowers(long bloggerType,long rankingType,int belong){
        return followersRepository.findByBloggerTypeAndRankingTypeAndBelong(bloggerType,rankingType,belong);
    }

    public List<RankingFollowers> findRankingFollowers(long bloggerType, int rankingType, int firstDate, int lastDate){
        return followersRepository.findRankingFollowers(bloggerType,rankingType,firstDate,lastDate);
    }


}
